﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Fdd.Aspen.Repositories;
using Fdd.Aspen.DomainModel.Entities;
using Fdd.Aspen.Test.Infrastructure;

namespace Fdd.Aspen.Test
{
    [TestClass]
    public class MemberEntityTest
    {
        [TestMethod]
        public void AddOneMemberAndGetIt()
        {
            var memberRepository = createMemberRepository();

            memberRepository.Add(new Member("John", "Doe"));

            Assert.AreEqual<int>(1, memberRepository.GetAll().Count());
        }


        private MemberRepository createMemberRepository()
        {
            var testObjectContext = new TestObjectContext();
            return new MemberRepository(testObjectContext);
        }
    }
}
